package org.slf4j.impl;

import com.xjd.edu.logging.TtlMDCAdapter;
import org.slf4j.spi.MDCAdapter;

/**
 * 覆写 Logback 中的同名类，如果不能生效，请使用 GameMdcBinder 来解决
 *
 * @author wangyu
 * @since 2023/2/3
 */
public class StaticMDCBinder {

    /**
     * The unique instance of this class.
     */
    public static final StaticMDCBinder SINGLETON = new StaticMDCBinder();

    private StaticMDCBinder() {
    }

    public static StaticMDCBinder getSingleton() {
        return SINGLETON;
    }

    /**
     * Currently this method always returns an instance of
     * {@link StaticMDCBinder}.
     */
    public MDCAdapter getMDCA() {
        return new TtlMDCAdapter();
    }

    public String getMDCAdapterClassStr() {
        return TtlMDCAdapter.class.getName();
    }

}
